This is generally allowed for all medical certificates, provided the refractive error is within the standard of EASA regulations. If you wear contact lenses, you should also carry a clear spare pair of glasses. If you wear glasses, you should also carry a clear spare pair. A pair of prescription sunglasses is not a spare pair, but you may wear them in the cockpit.