Theory of Optical Dephasing in Condensed Phases