Development of an optical sensor for measuring opacity changes in polyvinyl toluene scintillators