The Sefer Avodas Hamelech suggests that there are two types of nevuos. One type is when Hashem tells a navi a commandment and to relate it to klal Yisrael. Another type of nevuah is a gilui (revelation) regarding something. When the Rambam said that a navi cannot claim that Hashem told him that the halacha follows a certain opinion, he was referring to the first type of nevuah, e.g. that the navi would command us to follow that opinion. However, in the case of the bas kol the nevuah was simply revealing who Hashem decided the halacha should follow. It did not command us to follow that opinion. Therefore, we can follow the bas kol that said that the halacha is in accordance with Beis Hillel.