Mid-infrared optical modulator enabled by photothermal effect