Can I deduct the cost of the notary and mortgage deed?

Yes, this is possible in both cases. Please note that this does not apply to a property transfer deed!