You can't order any specific CPU - You have to use one that OEM supports... or you will have EFI, & OS problems. So your choice is limted to the 3.1 CPU (not much of a speed gain) IMnsHO if your machine is working sell it. Take that money and what you would spend on the upgrade CPU and buy a MacPro.
Unless you wish to spend a lot of time and money to create a custom iMac, what you propose is not cost effective. You have to find a 3.1 CPU for sale, you'll have to eat most of the money you've spent on the original machine (a used CPU is not worth a whole lot).
If this Answer is helpful please remember to return and mark it Accepted.