System and method for measuring temperature using an opto-analytical device