Not really. Yams are more starchy and dry compared to it's fresher counterpart. The latter in it's natural form is sweeter and more moist. It does help to use canned yams in sauce to get closer to the right flavor. If that is all you have then yes go for it but the overall flavor will be a bit different.