The latest version of Mac OS X (10.5.7) should run fine. However it will most likely be the highest your iMac can ever go as it appears that Snow Leopard (Mac OS 10.6) will be Intel only.
You have enough processing power. If it seems a little slow the only thing I'd do is upgrade the RAM. Other that, you have more than enough to run Mac OS 10.5 (Leopard).
MacOS X 10.5.7 is not a new OS. It is only the latest update to MacOS X 10.5. You iMac will accept the latest update to MacOS X 10.5, whatever that might be when you read this.
Comments
You have enough processing power. If it seems a little slow the only thing I'd do is upgrade the RAM. Other that, you have more than enough to run Mac OS 10.5 (Leopard).
In other words, you can use the latest version of 10.5.