Optical properties of low-dimensional semiconductor nanostructures under high pressure