Optical instabilities and localized electronic states in hydrogenated amorphous silicon