IIRC, the 2010 iMacs will go into limp mode and run fans at full speed if the temperature sensors are removed.
There isn't an external sensor for the HDD, but one internally. So, if the HDD is replaced with a SSD, the sensor circuit will be open, basically showing an failure in the sensor. With no temperature information given to the OS, the fans will run at full speed to protect the hardware.
I would assume that the optical drive temperature sensor would behave the same way.
There are adapters to get to prevent this. You can also use a software solution to control the fan speeds, there are some free ones out there. I use one on my 17" MBP just to keep it cooler than the OS would normally keep it due to that particular model having GPU related failures.
I haven't tried it, but I have heard that if you just jump the leads of the sensor connector, basically closing or shorting the circuit, this will get the fans back to normal and will not lead to any problems.