Considering that Netbooks are said to run Win7 just fine, I imagine your Pentium D will handle it with flying colors. Win7 only takes marginally more resources to run than WinXP.
That said, are you upgrading solely because you want 4GB of RAM, or are there features of Win7 that you're wanting?