You will find that there are zilch medicines licensed for goats... absolutely zilch. Your vet can prescribe any medication s/he thinks will be useful for your goats (its called the cascade system).
If there is a milk withdrawal time given for dairy cows I quite often take that as a guide, or to be totally safe 8 days (unless longer specified for cattle).
So it will be safe.
Jst checked and Trymox LA withdrawal time for milk is 84 hours - so that's just over 3 days. It will not have been tested for use in milking sheep - too expensive to get all the tests done for approval for niche species like goats and milk sheep....
What do you feed them at the moment? I would go easy on the concentrates and slowly build up, but things like readigrass and Alfa A are well liked, also a mineral drench (a sheep one with added copper will be good), lightly soaked sugar beet, vegetable stuff like brassicas, carrots. And while you still have branches - hazel, willow etc - give them those, with the bark peeled off as well. And - bananas! (peel and all, though not too many per day).