It looks like COD4 was only made to run on XP or Vista, so that may be part of the problem. That said, if you don't have enough RAM to run both Windows and COD, that's going to cause lag issues.
CoD4 runs fine on Win7; I've even run it on Win8.1 just fine.