In Tosephto Shabbos 7:1, it says that one who dances by a bonfire is following in the ways of the Emorites. In light of this, how can so many supposedly frum Jews dance around bonfires on Lag Lo'Omer?
From a Halachic perspective, this is not a concern, see this short article (Hebrew). For example, Rashba 1:167 says that only those practices also mentioned in the Gemara are subject to the prohibition of Darkei Haemori, and some have understood that this is the position of R' Yosef Karo in Shulchan Aruch, where he did not list the practices in the Tosefta, although others understand (based on comments in Beis Yosef YD 178) that he would be concerned for these practices.
He then brings a variety of sources that had the text "in order for [the fire] to come", and if so, it would only be prohibited when this was the intention...
Not sure why no one has posted Tosefta Kifshuta's comments on this yet, so I will. (Unlike the other mefarshim, who post their conjectures, he actually provides outside sources that confirm what or why these nations would follow such practices.)
He supports the suggestion mentioned above by various commentaries to the Tosefta by bringing Heinrich Lewy, who collected various sources from early secular literature to support that view, such as Theodoret and Hesychius. (For those of you who understand German, latin, and Greek see here for Lewy's original paper/citations on this chapter of Tosefta. The section in question is on page 27.)
He also brings up the possibility that this was to prevent the fire from spreading, along the lines of Pliny's comments about lightning (Natural History 28:5):
In addition to this, it is very clear that there are some religious observances, unaccompanied by speech, which are considered to be productive of certain effects... To salute summer lightning with clapping of the hands, is the universal practice with all nations.
He also points out that the Rambam in Moreh (3:37) makes reference to the idolatrous nations engaging in these actions as witchcraft/darkei ha'emori, see there for further details, and although it does not tell us what exactly was done, it does give a good background on practices such as these:
THE precepts of the second class are those which we have enumerated in the section "On idolatry." It is doubtless that they all tend to save man from the error of idolatry and the evil practices connected with it; e.g., observing the times, enchantment, witchcraft, incantation, consulting with familiar spirits, and the like. When you read the books which I mentioned to you. you will find that witchcraft, which will be described to you, is part of the customs of the Sabeans, Kasdim, Chaldeans, and to a higher degree of the Egyptians and Canaanites. They caused others to believe, or they themselves believed, that by means of these arts they would perform wonderful things in reference to an individual person, or to the inhabitants of a whole country, although no analogy and no reasoning can discover any relation between these performances of the witches and the promised result. Thus they are careful to collect certain plants at a particular time, and to take a definite number of certain objects. There are many things comprised by witchcraft; they may be divided into three classes: first, witchcraft connected with objects in Nature, viz., plants, animals, or minerals. Secondly, witchcraft dependent for its performance on a certain time; and thirdly, witchcraft dependent on the performance of certain acts of man, such as dancing, clapping, laughing, jumping with one leg, lying on the ground with the face upward, burning a thing, fumigating with a certain material, or speaking intelligible or unintelligible words.
Merely dancing next to a bonfire has nothing to do the ways of the Emorites, nor is it a form of fire worship, if the dancer(s) has/have no such intent.
The question is based on a misunderstanding of the words of the Tosephta.
המספק והמטפח והמרקד לשלהבת הרי זה מדרכי האמורי.
"Dancing TO THE FLAME is following in the ways of the Emorites."
The Minchas Bikkurim (ad loc.) explains the custom of the Emorites:
לשלהבת - שעושין דברים אלו למהר הבישול, אי נמי לאיזה סימן אחר שהיה להם בזה
The Emorites would dance to the fire, in the belief that doing so would cause the food to get cooked faster. Alternatively, they had some other specific intent regarding dancing TO the fire.
Rabbi Yechezkel Abramsky, in his commentary 'Tosefta Chazon Yechezkel' on the Tosefta, explains that the manner in which one qualifies for 'the ways of the Emorites' would be by dancing in order to expedite the cooking process.
שעושים דברים אלה למהר הבישול אי נמי לאיזה סימן אחר שהיה להם בזה
They perform these dances in order to speed up that which is being cooked on the fire. Alternatively, it had some other idolatrous significance.
See Maharik 88 for additional discussion concerning these types of prohibitions.