A few quotes from the Rabbi on 'Customs of Israel'
in which he permits replacing the olive oil Ner Tamid lamp with an electric lamp
Concerning the Ner Tamid that is customarily lit in synagogues using olive oil or other kosher lighting oils, new things have arrived of late. A certain rabbi has come here, an Ashkenazi who became a rabbi in Shanghai, may God protect it, and instructed to take down the Ner Tamid and to light an electric one in its place, for its light is powerful and also because in all British regions they have the custom of lighting [with] electricity instead of olive oil. They ask whether doing so is permitted, for it is known that the Torah said: "that they bring unto thee pure olive oil beaten for the light, to cause a lamp to burn continually" – while electricity comes from the earth and can be called neither oil nor lamp…
It is shown by the words of the Shulchan Aruch that the obligation in synagogues is not olive oil in particular, since he wrote: It is the custom to light lamps to honor them. End quote. He did not write that there is an obligation to enhance the mitzvah by using olive oil. Concerning the Sabbath light he did write about enhancing the mitzvah [by using] olive oil.
Therefore, if it is difficult for them to light with olive oil and their intent is to honor the synagogue by illuminating it well with electricity, one should not protest if they act thus. And God, blessed be He, will illuminate our eyes with His Torah, amen.
Yad Eliyahu, Part A, Introduction, p. 9b, Shemesh David Torah Library, Jerusalem, 1992