Band gap engineering and stimulated emission of ZnMgO nanowires