Controlled synthesis of GaN-based nanowires for photoelectrochemical water splitting applications