Efficient gating of epitaxial boron nitride monolayers by substrate functionalization