the tire will not stand taller on the narower rim , the radius from the axle center down is what you are really worried about & the load on the tire wil make the lower radius shorter then the top radius ,
the 31 tooth will turn the speedo slower so the speedo will read slightly low so you will be speeding slightly compared to the speedo reading , the 30 tooth will be the opposite way & will read s lightly higher than the actual speed , so it really depends which you are more comfortable with , personally I like to have the speedo read a little high so I have some error room