Yes, but make sure you sell the property and realise the loss before the end of the year.
Property transactions can drag on. If you make a profit on your shares this year, and the loss next year, you won't be able to carry it back against the profit.