Yes, you can take Colace, also known as docusate, while breastfeeding!
According to the National Institutes of Health , docusate is generally recognized as safe to use during breastfeeding. The drug is minimally absorbed from the gut, which means only a very tiny amount, if any, can reach your breast milk. In a nutshell, it's unlikely that docusate would cause any adverse effects in breastfed infants.
However, as with any medication, it's always wise to check in with your healthcare provider before starting on Colace.