I suppose you need a component that has to dissipate low power (i.e. low current flowing through it). There are many digital potentiometers, on the market, that can be varied sending them a digital word (typically SPI). If you need instead a potentiometer controlled by an analog voltage you can use PIC that converts the analog voltage to digital through an ADC and translate it in a SPI command. Other possibility design by yourself using fet as variable resistor.