Optical and electrical characterization of ternary and quaternary gallium nitride based alloys