http://revach.net/article.php?id=4134

Section: Halacha   Category: Food
When A Bracha Is Really Not

If someone is unsure whether or not he made a bracha (whether it be a bracha rishona or bracha achrona), he should not make a new bracha. If it was a bracha rishona, he should eat without making another bracha and if it was a bracha achrona, he should simply not make a new bracha achrona (Shulchan Aruch 209:3). The reason is because brachos are M'drabanan and safek D'rabanan is L'kula.

The Mishna Brura (215:20) takes it one step further and says if one does make a bracha, according to many poskim, he will be violating an issur Min Hatorah (of bracha l'vatalah).

There are however two exceptions to this halacha. If one is unsure whether or not he recited birchas hamazon, he must recite it over again. This is because birchas hamazon is Doraisa. The second exception applies to a safek D'oraisa. The Mishna Brura (209:10) writes that if one is unsure whether or not he recited an al hamichya, since there is a safek whether or not an al hamichya is Min Hatorah, one should eat additional food that would require an al hamichya and then have in mind the previous food in the new al hamichya.