Optical determination of the Boltzmann constant