Yes, but the SSD will run at SATA II speeds. On top of this, you will need a 2.5"-3.5" adapter to mount it in the computer, These are very easy to find and can be found on sites like Newegg and Amazon.
You are going to plug the thermal sensor to the SSD rather then the adapter, since this will make sure your drive temperature readouts are available and the computer does not run the hard drive fan at full speed. However, you may need a 3rd party one with a 2.5" drive, since they may not interface with the original pinout.
The guide can be found here: iMac Intel 27" EMC 2309 and 2374 Hard Drive Replacement