While you could put in a 2.5" SSD you'll hit a few issues. Your system has a SATA II (3.0 Gb/s) interface so what ever drive you put in will need to support that speed (review the drives spec sheet). You'll need a 2.5" to 3.5" adapter frame to hold the SSD replacing your current HD. This systems optical drive is only a PATA drive which is very slow so I wouldn't waste the effort swapping out the optical drive for a SSD or even an HD.
The last issue you face here is installing the older OS this system needs. Apple doesn't offer it any more in their App Store. So you'll need to find your original CD/DVD's that came with your system or can locate the retail version and you might need to upgrade your RAM to 4 GB or 6 GB to use one of the newer OS's this system still supports.
Now the Rub! You may end up spending more money trying to boost your old system when you might find a used newer model (used) that might make better sense going forward. Don't forget the bigger SSD's are quite expensive if you need more storage space a SSHD maybe a better direction. You do get a snapper system with a hybrid HD vs a traditional HD.
Here's the IFIXIT guide you'll need to follow: iMac Intel 20" EMC 2133 and 2210 Hard Drive Replacement You'll need to place the thermal sensor back onto your new drive (HD or SSD) as the system requires it.