Yes it's ok to wash mushrooms. This vegetable often have excess dirt on them that doesn't always easily come off with just a wipe. It works best to rinse the mushrooms in a colander where they can easily drain. Two things to keep in mind are not to soak mushrooms in water and not to rinse them to far in advance. It's best to do it as close to the cooking time as possible.