Pension contributions are daily, not weekly, and are paid on straight hours only.
I can see what you are saying as well but I am pretty sure that in the example that you gave it would be 39, not 40.
Let's say, for example, that you worked 4 10's but took a dead day on Tuesday. You may think that the 8 hours of OT would take the place of the dead day but in actuality you would only get pension contributions for the 32 hours of straight time.
We had our union meeting last Saturday and the topic of pension contributions being paid for all hours worked was discussed. Our BA basically told us that the company would never agree to contribute to our pensions for all hours worked.