Effects Of The Chemical Environment On The Optical Properties Of Semiconductor Nanostructures