"Specks" on photos - possible to repair?
As far as iPhone replacement parts go, the usually the only ones that cost more than a few dollars are the digitizer assembly (touchscreen), logic board, battery, and (for the iPhone 5 and later) the rear case of the iPhone. Cameras usual cost less than $5.

Replacing the camera in the iPhone 5 is more complicated than it needs to be, but definitely possible. Here's the iFixit guide.