Laser measurement of the ^16O-^18O isotope shift at optical frequencies