Adèlic formulas for string amplitudes in fields of algebraic numbers