You will need:
3% hydrogen peroxide solution
Sodium bicarbonate (baking soda)
Mix ½ cup (115 mL) hydrogen peroxide and 10 g of baking soda in a cup. Let it sit until the hydrogen peroxide starts fizzling. Start your washer, pour the solution in, and let it run through a cycle (rinse only cycle is recommended). Add some scent if desired.
The chemical explanation of this process is: The hydrogen peroxide is adducted to the sodium bicarbonate, forming sodium percarbonate in situ. Sodium percarbonate is used in commercial washer fresheners.