The DM's mistaken about how the fire damage works...
The DM's correct that damage reduction doesn't reduce damage from non-weapon attacks (e.g. energy damage, falls, poisons), so a creature with damage reduction takes full damage from, for example, fire. (To take less fire damage, the creature needs the special ability resistance to energy.)
But a weapon with the weapon special ability flaming, for example, doesn't convert all of a weapon's damage into fire damage; the weapon special ability says
Upon command, a flaming weapon is sheathed in fire that deals an extra 1d6 points of fire damage on a successful hit. The fire does not harm the wielder. The effect remains until another command is given.
Only that extra +1d6 points of damage is fire damage that, therefore, ignores a creature's damage reduction.
The DM might be mixing up the rules for dealing precision damage (like sneak attack deals) with an attack that deals only energy damage (e.g. the spell scorching ray (but this special case is also addressed here)) or an attack dealing negative energy damage (e.g. inflict light wounds). When a creature is eligible to deal precision damage with such attacks, the precision damage is the same kind that was used in the attack. However, if precision damage is dealt with, for example, a +2 flaming greataxe the damage remains slashing because the energy damage from the weapon special ability flaming is extra damage.
...But a critical hit dealing 40 points of damage is not unreasonable
The boarding axe and handaxe deal 1d6 points of damage, a battle axe 1d8 points of damage, a dwarven waraxe 1d10 points of damage, and a greataxe 1d12 points of damage. All of these weapons do triple damage on a critical hit.
A +2 magical enhancement bonus adds that enhancement bonus to the damage the weapon deals before determining the damage dealt by the critical hit. Any Strength bonus the wielder may have (and that Strength bonus, in turn, is ×1½ if the weapon is used two-handed, as must the great axe and as can be all but the boarding axe and handaxe) is also added to the weapon's damage before the critical hit. Some feats—notably Power Attack and Weapon Specialization—add to the damage the weapon deals before determining damage done by a critical hit, too.
This makes reaching a 40-point-plus threshold on a critical hit with an axe trivially easy. For example, a Str 14 dwarf with a +2 greataxe who uses the feat Power Attack to gain a +3 bonus on his damage roll in exchange for a −1 penalty on the attack roll deals 1d12+8 points of damage with a typical greataxe attack and deals 3d12+24 points of damage on a critical hit, an average of 43.5, just about enough to deal 40 points of damage to a creature with DR 4/— without shenanigans and before any fire damage for a +2 flaming greataxe.
A higher Strength dwarf or a dwarf that uses the feat Power Attack to a greater degree can even deal such damage using a more conservative weapon than the mighty greataxe.
For clarity, first damage dealt is computed then damage reduction is applied. (For example, a creature attacks with a greataxe that deals 1d12+8 points of damage and scores a critical hit. The foe does not first subtract its DR 4/— then the creature multiplies the damage by 3. Instead, first the creature rolls the damage thrice for the critical hit then the foe subtracts its damage reduction.)
So you know where this is from, the section Combat on Damage on Multiplying Damage says
Sometimes you multiply damage by some factor, such as on a critical hit. Roll the damage (with all modifiers) multiple times and total the results.
Note: When you multiply damage more than once, each multiplier works off the original, unmultiplied damage. So if you are asked to double the damage twice, the end result is three times the normal damage.
Exception: Extra damage dice over and above a weapon's normal damage are never multiplied.
That exception's kind of important here, too. That means, for example, the extra +1d6 points of fire damage does not become +3d6 points of fire damage on a critical hit but, instead, remains +1d6 points of fire damage, added after the weapon's damage, critical hit or not.