Boot from the XP CD and run setup from there. You'll be given the opportunity to repartition/reformat your disks. See your computer's manual for information on how to configure it to boot from CD.
Doug Knox has already answered your question, so I won't repeat
it, but a word on the terminology: You currently have *two*
partitions (C: and D. You don't want to remove "the" partition,
you want to have a single 40GB partition