Generally speaking, yes. The only potential hindrance would be if your system is old enough to be IDE only (and that seems likely if it only has a CD-ROM) and the replacements you might get are SATA. Outside of that, the only thing you really have to worry about typically is cosmetics.
i have an old office used desktop pc ( gateway or Hp ??) with winXP. currently only has cd ROM drive. i've been using an external dvd-r for needs but its lame.. Can i put a cd/dvd -r drive from a dell 3000 deminsion pc into it??

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic