Both of these ingredients help the bread to brown, but the taste is not the same. Butter yields a better flavor, but if you don't have any softened for easy spreading, then use mayonnaise instead.