Beurling-Selberg extremization and modular bootstrap at high energies