Optical drives have separate laser diodes for CD and DVD, because the two different disk formats use different wavelengths of light. The laser diodes wear out eventually, and usually one dies before the other. That leaves the drive capable of reading one type of disc but not the other. It's a very common situation - not just for laptop drives but also for desktop drives and consumer DVD video players.
The only practicable solution for your laptop is to either replace the drive with a new one or to buy an external USB-connected drive.