Theory of the thermal expansion anomaly in solid nitrogen due to O2 impurity