McCarthy scored the only goal of Tuesday's third-round tie at the City Ground after 37 minutes, curling a dangerous right-foot free-kick into the box that evaded everyone inside a crowded penalty area and nestled in the far corner.
Brown ensured Rovers would hold on for the win by producing a superb save to keep out Dexter Blackstock's well-struck spot-kick after Steven Reid clumsily handled the ball inside the box midway through the second half.
Allardyce, who made 10 changes from Sunday's dismal Premier League defeat at Everton including handing a debut to 17-year-old defender Phil Jones, dismissed suggestions that McCarthy's goal was fortuitous.
He said: "Benni meant to do that, we practice it in training all the time.
"We always practice to hit the target as the goalkeeper can't do anything about it as there's a cluster of players there that may get a touch.
"So if someone gets a touch it can go in and if someone doesn't, the goalkeeper is left stranded and it goes in the back of the net.
"It's the quality of the ball from that angle to get it on target that was the difference in quality between the teams.
"That outstanding free-kick and Jason Brown's absolutely superb penalty save from a very well-taken penalty was the quality that won us the game.
"I was disappointed with the decision of the referee to give the penalty as it could have thrown us into extra-time which we wouldn't have wanted, but we overcame it I'm glad to say."
Allardyce added: "Overall I'm delighted. It was a tough match like we expected and we came through with no injury problems and gave a lot of players some really good football to catch up with match fitness.
"With a squad of our size, it's important to give players some high quality time on the pitch. We made 10 changes and it disrupted the team initially as they are a group of strangers playing together, really.
"We had two exciting lads making their way in the team in Junior Hoilett and a young lad who made his debut at the back and looked like he'd played there for a number of years in Phil Jones."
Defeat was harsh on Forest as the Championship club dominated for long spells and created the better chances throughout.
However, even Forest boss Billy Davies conceded that McCarthy's goal was a moment of class.
"It was a fantastic delivery as it is one of these goals where there's about six or seven bodies running across that goal and it can hit anybody and go anywhere and it has sneaked it at the far corner," said the Scot.
"It's a fantastic delivery but a stupid free-kick to give away."
Davies added: "We dominated and should have been well in front, we hit the bar, missed a penalty and outplayed a Premier League
"I have nothing but praise for the players. For whatever reason at the moment we are just in a very bad run of luck, not just one game, it has been a consistent run of bad luck since the start of the season.
"We are dominating games and playing well in my opinion, but such is life."