I'm not 100% sure on the DHTxx but in general if the sensor has a wider supply range (e.g. 1.8-5V) it is totally ok to connect its Vcc to a gpio to control supply.
One thing to obey: if you use external pull-ups on i2c, several sensors will not accept Vcc disconected while parasiticly being supplied via pull-ups on i2c (e.g. BME280 specifically warns about!).
If you're not using external pull-ups (only esp8266 internal), keep connections short.
If you power pull-ups and sensor via gpio, think on providing time for Vcc to settle and sensor to startup.
BUT: most modern sensors usually go to deep sleep (only several µA) between measurements, making this "trick" unnecessary.