An optimal approximation for the payoffs of variance swaps in static replication