The correct sentence that uses the direct object pronoun to substitute "el jabón" (the soap) is:
C. Ayer lo compré.
The direct object pronoun "lo" is used to replace "el jabon" because "jabón" is masculine singular.
(Note: The verb "compré" needs to have an accent on the "e" in "compré" to indicate it's in the past tense.)