Narrated `Aisha: (the wife of the Prophet) Hamza bin `Amr Al-Aslami asked the Prophet (peace be upon him), “Should I fast while traveling?” The Prophet (peace be upon him) replied, “You may fast if you wish, and you may not fast if you wish.”
Sahih al-Bukhari, Book 30, Hadith 50