Phonon-assisted optical transitions in GaN with impurities and defects