"We used a special soap to wash the clothes." is okay.
"We used a special soap for washing the clothes." is okay. This means approximately the same thing as the first sentence. The difference is ever so subtle. The first sentence implies that the clothes and washing were ordinary, but the soap was special. The second sentence implies that the clothes, the washing, and the soap were no