Depends on if the CD/DVD is writable/burnable. If it's a burnable disc, and you have some kind of self-replicating malware of any sort, it's entirely possible for it to transfer itself onto the disc along with other files.
If we're talking a commercially pressed music CD or movie DVD, then your friend is correct. The discs are read-only, so it would be impossible for any malware to get on them after they were pressed at the factory.
Long story short, so long as ANY medium is writable, you can have malware hitch a ride. Floppy disk, portable HDD, CD, DVD, flash drive, backup tapes, and anything else I may be forgetting off the top of my head. If you can write to it, then malware can infest it, simple as that.
My friend believes that cd's/dvd's are impervious to viruses, trojans, malware and/or stuff of that nature...