Yes, performing Tavaf while carrying a baby or small child is completely valid. Hz. Peygamber (sallallahu aleyhi ve sellem) confirmed that children can perform Hac, and a parent carrying a child in Tavaf receives the reward for their own Tavaf. If the parent makes the intention for the child's Tavaf as well, the child also gets credit for the Tavaf. This is established by the hadith where a woman presented her child to Hz. Peygamber asking if the child could perform Hac, and he confirmed it.
Safety is the primary concern when performing Tavaf with an infant. The ground floor of the Mataf can become extremely crowded and dangerous for small children. Use a secure baby carrier (front-facing is sunnet so you can monitor the child and protect them from the crowd). Avoid using strollers on the ground floor during peak times — they are difficult to maneuver and can pose safety risks. The upper floors are significantly less congested and more suitable for families with young children.
Practical tips: perform Tavaf during the least crowded hours — typically between Isha and Fajr namazs or during the early afternoon. Bring extra diapers and supplies in a small bag. Ensure the child is clean from any impurities (najasah) as purity is a requirement for Tavaf. If the child becomes distressed during Tavaf, you may pause briefly to comfort them. Bring water for both yourself and the child, as the Mataf area can be very hot.