Exponential bases, Paley-Wiener spaces and applications