Probably not, in order to take a mileage deduction, your primary purpose of the trip would have to be to make the donation.
If you are going to church for services, your primary purpose would not be the donation, instead, it would be the church services.
If you are simply going to the church to volunteer your services or make a donation, and not attending services then yes you could claim your mileage.