Molecular spectra and optical investigation of dissociation and ionization of simple gases by electron collisions