Welcome to Android Central! Do you mean a Galaxy S5? There's no G5 phone from any major manufacturer that I'm aware of.
It's probably not worth trying to hook up an optical drive to the phone--that probably requires some specialized cables and/or rooting. Instead, connect the phone to your computer via USB, insert the CD-ROM into your computer, and use the computers file explorer to copy the photos over to the phone. You could also upload the photos to a cloud storage service (like Google+ Photos or Dropbox), from which you could easily access them on any device that is logged into that service.