As mentioned, the size of the rims (the steel or aluminum part) has zero affect on the speedometer. It's all about the total height of the tires you have mounted on the rims. If you have 17" rims with tires that are 31" tall and then install 20" rims with tires that are 31" tall, it does not affect the speedometer. If you put 20" rims on the truck but the tires you use are now 33" tall than you obviously do affect the speedometer. With a taller tire the speedo will run slower, and along with that the odometer (miles) will read lower. How much different depends on how much of a difference the tire height is from stock....the taller the tire you get the more the speedo will be affected. In regards to the miles that means the truck will show you went less miles than actual, and if you hand calculate it will make the mileage look worse. You can recalibrate the speedo/odo to correct for this.
While a taller tire without recalibrating the speedo/odo will make the mileage appear worse, generally when you put a taller/bigger tire on a truck you decrease the actual MPG. There are several variables, but a bigger tire is usually heavier and increased size means it has more leverage. Overall that means it is harder to turn and the engine has to put out more power to do so. Another big factor is the rolling resistance, and a more aggressive tire usually has more rolling resistance. So if you go from a 31" highway tread tire to a 33" mud tire I would expect it to make a pretty big difference.
In the end, if you put on taller tires without calibrating the speedo/odo the fuel mileage will be worse both by the fact the miles aren't correct and the tires themselves are decreasing the mileage.