Not out of the box — Windows has no native driver for a DualShock 3, so plugging one in and expecting it to work will fail. The flat answer of "no" is really "not without extra software."
The standard workarounds are third-party driver tools such as DS4Windows, which was built for the DualShock 4 but handles earlier controllers, and the older SCP Toolkit or MotionInJoy packages. Each presents the pad to Windows as a standard game controller, after which CoD4 picks it up in its control settings.
Two caveats worth knowing. Some of these tools require a Bluetooth dongle and specific drivers to work wirelessly, and older packages like MotionInJoy have a poor reputation for bundled software — prefer a current, open-source option. A wired USB connection is simpler and more reliable if you only need it for one game.