I was always under the impression that Judaism firmly believed that there are no intermediaries between man and G‑d, and to pray to the deceased is blasphemous and outlawed by the Bible. If so, why is it permissible to ask the Rebbe to intercede on one's behalf at the Ohel?
Yes, Jewish customs can be perplexing. Judaism is all about having a direct connection to G-d. An intermediary is a form of idolatry (see "Unidolatry" for more explanation of why this is forbidden.). Yet for as long as there are records, Jews have been in the habit of asking righteous men and women to have a chat with G-d on their behalf.
We see that the Jewish people asked Moses to intercede many times and he accepted their request. If he hadn't, we wouldn't be here--so G-d obviously figured it was okay. The Talmud (Baba Batra 116a) tells us that "If there is someone ill in your house, go to the wise man of the city and ask that he should pray for him." Of course, this person also needs to pray for himself, as his family should as well--and any Jew who knows that another Jew is ill should pray for him. But you need to go to that wise man as well.
The same with visiting graves: On the one hand, as you pointed out, the Torah tells us not to "beseech the dead." It's listed along with all the other "abominations" practiced by the people that lived in Canaan before we came there. And yet, we have an ancient and popular custom to visit the graves of righteous people and pray there.
Just how ancient and popular is this custom? The Torah tells us that Caleb, one of the twelve spies that Moses sent to spy out the Land of Canaan, made a personal detour to Hebron. What was his interest in Hebron? The Talmud (Sotah 34b) tells that he wished to pray at the cave where Abraham, Sarah, Isaac, Rebecca, Jacob and Leah are buried. He prayed there for mercy on his soul and he was saved from the fateful decision of the other spies.
The Talmud also states that it is customary to visit a cemetery on a fast day (Taanit 16a). Why? Typical of the Talmud (and anything that involves Jewish people), two opinions are provided: Some say that this is simply to remind those who are fasting of their own mortality--a graveyard can be a magically effective cold-bucket of inspiration when you're feeling smug and self-assured. But others say that this is in order to connect to ask the souls of the righteous who are buried there that they intercede on our behalf. In fact, the Zohar states that if it were not for the intercession of those souls who reside in that afterworld, our world would not endure for a moment.
So why is this not called "beseeching the dead?" And why doesn't asking any tzaddik, living or dead, to intercede on our behalf constitute making an intermediate between ourselves and G‑d?
This very question was raised by a nineteenth century foremost authority on Jewish law, Rabbi Moshe Shik (known as "the Maharam Shik"), a student of the Chatam Sofer.
He explains as follows:
A Jew is not permitted an intermediary. There must be nothing between the Jew and G‑d.
Nevertheless, as previously established, it is permissible for a Jew to ask another Jew to be an intermediary between him and G‑d.
Rabbi Shik explains this apparent anomaly in the name of his teacher, the Chatam Sofer: When one Jew approaches another and tells of the pain he is suffering, the other Jew feels it just as he does. Now they are both in need of prayer. The Jew does not feel he is praying for an "other"--he is praying for himself.
In other words, all Jews can be considered as one body. If the toe is hurting, it needs the head and the heart to help it. So too, if I am in need, I can call upon all other Jews--and especially those who are the head and the heart of our people--to pray for me as well. Because if one Jew is hurting, we are all hurting.
Rabbi Shik then extends this to the deceased, as well. According to the Talmud and the Zohar, those righteous souls who have passed on from this world are still very much in touch with their students and family and care for them and their problems. We petition them to pray on our behalf--and they do and often their prayers are more effective than our own. After all, we often don't fathom the seriousness of these problems from our limited perspective as much as they might from their much more lofty view.
Praying at a gravesite does not mean you are beseeching this dead person to rise from the grave and appear before you. That is the abomination to which the above-cited verse refers. Neither are you, G‑d forbid, praying to the dead—a practice that is most certainly forbidden. But you are able to connect with these souls, since, when it comes to the soul, all of us are truly one.
You are simply expressing your faith that the righteous never really die, truth is never truly lost and even the grave cannot prevent you from connecting to this great teacher and righteous soul. Just as this tzaddik cared and took care of others during his lifetime--not as "others" but as he cared for his own soul--so too now, nothing has changed and he still can feel your pain and pray with you.
The Zohar states this as well, when it tells us that the tzaddik is here with us after his passing even more than before. During his lifetime, the tzaddik was limited within a physical body. Now he has transcended those limitations. But he never transcends his sympathy for the plight of another soul--no matter where that soul may be found. Just as during his lifetime, he ignored the boundaries of "I and you," so now he can ignore the boundaries of life and afterlife.
This is the fundamental reasoning behind beseeching those in the grave to intercede on our behalf. And this, in fact, has been the common practice in Jewish communities around the world.
Click here for a profound and thorough guide to visiting the grave of a tzaddik. Perhaps you will make a visit yourself.