G-d does not accept mitzvos as bribes. For instance, the Holy One, Blessed is He, does not say, "He has fulfilled forty mitzvos and committed ten aveiros; thus, the reward of thirty mitzvos remains, for ten are deducted for the ten aveiros." G-d forbid! Rather, if even a perfectly righteous individual commits a single aveira, it is considered to Hashem as if he burned the Torah scroll - until he appeases Hashem for his guilt, after which he will receive reward for all his mitzvos. This is a great kindness that the Holy One, Blessed is He, does for the righteous. He does not deduct from their mitzvos, for mitzvos are very precious and ascend until they come before His blessed Presence.
(Tomer Devorah, Perek Aleph)