You can use the dog medication. Frankly it's not very exact, but these medications are not very toxic, so if you are a bit wide on the dosage it shouldn't harm the toads. Regarding the gram size, I would get the smallest package. You'll likely still have way more than you need though.
Remember that it's no good just treating the toads if the terrarium isn't sanitized as well.