Now, assuming that *opy/irъ is in fact an original Slavic term, what is its etymology?
This is where it gets complicated. Jan L. Perkowski begins by dividing the form into three morphemes – its prefix, its root and its suffix (*o + pyr or pir + ъ). If the root is pir, perhaps it comes from Serbo-Croatian pirati (to blow); perhaps from pero (feather); perhaps from pij (drink). If it’s pyr, perhaps it comes from Russian netopyrъ (bat).
So much for the root… As far as the prefix is concerned, it’s generally believed it evolved as follows: u- ← *o- → vam-, with u- held to be the older form, based on the Old Russian name of Upirъ, and vam- a secondary development in South Slavic. As to what these prefixes mean, both “depriving someone/thing of” and “away from” have been suggested.
The suffix has received much less attention – generally it’s considered a post-verbal (a marker following a verb).
Jan L. Perkowski now offers an etymology that seems very convincing. The name of a Manichaean god ‘Båm’ or ‘Bån’ is found in a Sogdian (Iranian) manuscript that is at least a thousand years old and written in Syriac. This Båm is described as the great builder whose task at the end of the world will be to carve a stone tomb for the grave of Darkness (one of the two dual forces in Iranian mythology).
The name – and idea – may well have penetrated into the Balkans. A letter written by Theophylactus, Patriarch of Constaninople (933-956 A.D.) contains the name of a heretic named ßαανηζ (Baanes), branch leader of the Armenian Paulicians, a heretical offspring from Syrian Christianity. Now, this name in its Armenian form is Vahan (modern Armenian, ‘shield’), and may well be cognate to Vahagn, an Armenian god with fire for hair, flames for a beard and suns for eyes.
The letter ß (beta) was pronounced as a “v” in the Greek of that period – that means the name might have entered the Slavic as *van-.
If, then, *van- is used as a prefix before the Old Church Slavonic pirъ (meaning ‘revelry, drinking bout’, from the Slavic verbal root pij ‘to drink’), one ends up with vanъpirъ (meaning Van’s Festival), and the progression *vanpir → vampir → *opir → upir. This suggested etymology is interesting; it certainly suggests that the form vampir would have tended to retain that form in its area of origin (Bulgaria, Macedonia, South Serbia), but when spread northwest to the Dalmatian coast, to Kiev and the East Slavs (Ukrainians, Russians, Byelo-Russians), and via the East Slavs to the West Slavs (Poles, Kashubs, Czechs, Slovaks), *vam- would have followed the expected phonological development: *vam- → o- → u-.(Perkowski, pp. 32-34)