Is Safari on iPad and iPhone identical? I have an iPad for testing websites I develop but am wondering, does this completely cover me for the same version iOS on a mobile?

And I don't mean roughly, would it be exactly the same code base for Safari regardless of the device (so long as the operating systems were the same)?
The binary might be the same, but the code contains conditionals so that some parts works differently on the iPad compared to the iPhone. Just check out the user interface - they are definitely not identical.

Besides, there's obvious differences in for example screen size, resolution, CPU speed and RAM.

If you haven't got an iPhone to test with you could download Xcode from Apple and use the iPhone simulator to test your web sites with.