In southern Togo and Ghana, the Ewe people have a myth of such a vampire, called the Adze. The Adze is a type of vampire creature who turns itself into a firefly or other insect to feed before returning to its human form. They can transform themselves into any number of common insects which are seemingly harmless, and very difficult to capture.
The Adze have a taste only for the blood of the innocent. They are hunters of children, and only children, and they especially like to feed on infants. They can also feed on palm oil and coconut water, and often will raid a village entire supply of these, but they become dangerously weak if they do not feed on the blood of children. An Adze can sustain itself without needing to kill any child. It can take enough blood to survive. However, if the Adze is deterred or thwarted from feeding for a long enough period of time, it will go on a ravenous frenzy for blood. Often when the vampire reaches this stage of hunger, even the victims who survive become infected with a deadly disease which eventually kills them.
The Adze can also have the power to possess a human and become a living vampire. When the Adze is captured, it will revert to its human form. A human sorcerer can also willingly become possessed by an Adze spirit for the abilities and powers they will gain. As an Adze host, they are able to change their form, like a shapeshifter, from human to something else by magic. When they are captured, however, the magic will be lost and they will revert back to their human form. This is the only way to destroy the Adze, but catching them is the trick.
There is no way to protect against an Adze. Nothing will keep them out, or keep a child safe from its attacks. The only measure that can be taken against them is capturing them and destroying their human form. The safest thing to do is keep your supply of coconut water and palm oil up and set a trap.