Semiconductor nanowires: optics and optoelectronics