First off, don't try to open the "2nd" door that you come to, the one at the sort of bottom left of the dungeon. You only get 2 gems total, and have to open the first one and the last one. Bypass the 2nd one you see by going around through the lava area and taking a little damage.
To get past the third one, get the gem from the inside the statue that is past the letter puzzle on the floor. This should all make sense once you see it, but if not just post again, I'll add more details.