Nitride-based light emitting diode and photodetector dual function devices with InGaN/GaN multiple quantum well structures