Tuning the shape of semiconductor nanowires for advanced photovoltaics