Actually, the filters are usually the problem. Here's an automated script for fixing them, takes the risk of editing the wrong thing away.
Now, if you've deleted some other stuff associated with the drives, you may have done something that this script can't fix. If so, I suggest a repair installation of XP to attempt to correct that.
Fix for missing DVD/CD drives.
Create a text file with the following stuff in it exactly as below and name it FIXCD.REG
Double click on the file and say yes to the merge into registry question.
----------------------- cut after this line, contents of FIXCD.REG -----------------------------
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}]
"UpperFilters"=-
"LowerFilters"=-
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdr4_2K]
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdralw2k]
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdudf]
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UdfReadr]
------------------------------ cut before this line --------------------------------
I stole ..uh uh.. borrowed this from johnwill so if it doesn't work we will blame him
...and of course if it works I should get the credit