Yes, you can. Both of the items come from the same tree. So, they are compatible to replace each other. Nutmegs are less spicy than mace spice. So, if you use nutmegs in your recipe, you might need to add more in amount. But, again, it’s all about the proportion of ingredients.