Learning Sampling Dictionaries for Efficient and Generalizable Robot Motion Planning with Transformers