Optical simulation of complex nanostructured solar cells with a reduced basis method