Waveguide for efficient light trapping and absorption