Yes. Putting it on your credit card is the same as paying it. You can deduct the full amount. But you can't deduct any interest or penalties you paid on it.
If you put it on a credit card or took out a loan you can deduct the full amount even though you pay it over time. If you are on a payment plan with the hospital or doctor, etc. then it's only the amount you pay. Either way you only can deduct the principal amount, not any interest.