The 21.5 inch 2012 iMac has no user accessible memory slots (according to the Apple iMac tech specs) and that is where I would recommend 16GB Apple option for future proofing. You will notice that Macsales also offers a memory kit for the 2012 21.5 inch iMac. They use red ink to describe the memory upgrade process as “very complex.” Since Apple didn't design this machine for memory upgrades, the mental cost of tearing it apart would exceed the money saved.
I'm aware of all of that. I did not occur to me that you might be referring to a size that wasn't being discussed in this thread - my apologies. I would not buy a 21"; actually, my current 27" i7 iMac will most likely be my last iMac - may look for more appropriate replacement options when the time comes in 2015 (once the Applecare expires).
If your modules are the exact specs for the new Mac, yes you should be able to, I would just make sure they're in "matching" slots - as I understand that the slots in the new Macs are vertically installed, I'd put the modules in the same slots the OEM RAM is in or in slots 1 and 3 from the top (as I understand it, that is the equivalent of matching them horizontally). Personally, I prefer populating all the slots.