Polarized resonant inelastic X-ray scattering as an ultrafine probe of excited states of La2CuO4