It may work: The d64copy utility has and --end-track command line option, so with --end-track=40, it might do the right thing. Wether it really works... needs to be tested.
Thanks for your answer. I usually use ZooomFloppy with openCBM user interface. Can you explain step-by-step how to tell to the ZoomFloppy to write a 40 tracks disk?