Depends on how precise your references are.
If you want to have, to take Yair's example, a scene where a wizard is described at casting a fireball at an ogre, that's hardly derivative work. Concepts of ogres, wizards, and fireballs are universal in today's pop-culture.
Now, if you want to say something like:
Seeing his companions unable to affect the ogre, their carefully-aimed strikes seemingly deflected, Felstaff understood their foe was warded by potent magic, probably shield or mage armor. He incantated a dispel magic targetted at the ogre, feeling the magical wards melt under the strength of his arcane arts. He followed by launching a spell of Melf's acid arrows on the hulking brute. "Try again now," he shouted to Ulfrid the fighter. "He should be easier to hit!" The ogre moved now more clumsily, with much less accuracy. Syarnia sacrificed a hold person spell, useless against an ogre, to change it into a cure moderate wound to heal the wounded Zorvick. The halfling, regaining consciousness, lost no time in moving to flank the ogre with Ulfrid, sneakily punching the ogre's hocks. As Ulfrid coup-de-graced the downed ogre, Felstaff was worried. Who could have warded that ogre? He became even more worried when he felt the presence of a scrying sensor peeking at them!
That's more debatable. You clearly make a lot of direct references to D&D, and getting WotC's authorization would be necessary.
Now, I don't believe in the usefulness of using the d20 license if all you do is tell a story. By the way, in that case, it's better to refrain from describing the mechanics too much. A novel should read as a novel, not as a session report.
On the other hand, if the novel features a few rulesy stuff (the heroes's stat blocks, at the start and at the end of the adventure, for example, and maybe a few unique magic items or creature you invented for the story), then it would be legitimate to brand it as a d20 book. Remember the 5% OGC rule -- it's kinda pointless to say the opening chapter of a novel is OGC, so you'd have to give actual gaming content.
Nothing beats asking authorization, anyway. You'd have to respect the license, but you could be allowed to use the actual names of magic items (
Melf's acid arrows, Mordenkainen's disjunction, Hevard's handy haversack) if you ask politely and provide the proper legal blah-blah ("Melf, Mordenkainen and Hevard are IP of WotC, used with special authorization, blablabla").