It is narrated from Aisha (may Allah be pleased with her) that Hamza bin Amr Al-Aslami (may Allah be pleased with him) used to fast frequently. He said: O Messenger of Allah (ﷺ)! Should I fast while traveling? The Messenger of Allah (ﷺ) said: "If you wish, then fast, and if you wish, then do not fast."
Hadith Referenceمسند الإمام الشافعي / كتاب الصيام / 625
Hadith Takhrijاخرجه البخاري، الصوم، باب الصوم في السفر و الافطار (1943) ومسلم، الصيام، باب التخيير في الصوم والفطر في السفر (1121)۔