Yes, you can. However, desiccated coconut tends to be drier and will therefore absorb more moisture in the recipe.