Engineering light absorption in semiconductor nanowire devices