Tailoring the optical properties of MoS2 and WS2 single layers via organic functionalization