There are already a number of arrangements where corporations can pay penalties to 'approved' charities instead of the regulator as part or all of an agreement; these deals have been problematic, as the government officials appear to be using the arrangements to favor interest groups and potential future employers.
I am not saying your idea is a bad one, but I think it is useful to know where the potential problems lie.