If its mandatory, I do not believe there is a legal way to do this. Can someone provide some sourced explanation? Every professional I ask says this is illegal.
I'm not a CPA, and I haven't read the tax code but I don't think 'mandatory' is as relevant as 'value of goods/services received'. Consider a $500 dinner or a $500 concert, where the portion of the fee equal to the value received ($100) is not deductible the rest ($400) is, even though you have to pay (mandatory) the whole $500 to attend.
If tuition fully covers the cost of running the
non-profit school, one could argue the
'value of the services received' equals the school's cost per child. (That is obviously somewhat subjective)
The building fund is then a separate charge that is above that (value of services received), and could be deductible. It would take another step to extend this to those getting a large enough tuition discounts that they are paying less than the cost to the school per child.
On a related note, I have heard rabbonim quoted as saying that the portion of tuition that exceeds the non-profit school's cost per student (in essense to subsidizing tuition of other children), could be considered part of Maasar.
As a practical matter, best to consult your own Rov . . . and a CPA.