A micromachined accelerometer based on optical transduction