Correlating optical absorption and thermal conductivity in diamond