Replace an iMac superdrive with one pulled from a Macbook Pro?
This issue is likely form factor more than anything else, though Apple is famous for custom connectors...

I would look through the take-a-parts on fixit.com on those two units and see if they look the same. 

Also a bit of googling for a replacement drive for both and seeing if the part numbers are the same.