The Cottagers took the lead in the 41st minute through a Fredericks drive from long range that went into the goal via Jack Robinson's unfortunate deflection.
What followed was a frantic end to the game as the hosts had their West London rivals under siege, but the visitors were able to hold out until the final whistle.
"It was scrappy towards the end. They brought on big Matt Smith and to be fair he caused carnage at the end, but we held on," Fredericks told Sky Sports News.
"Teams have got to come onto us and we've got the players to play on the counter-attack.
"It took us a few weeks to get into our stride, but we've shown we can scrap it out too."
The result means that Fulham move into eighth place in the Championship table, just one point off the playoffs.