Yes, if you are a licensed real estate agent you are treated as a self-employed individual (unless you are a W-2 NON Statutory Employee)
This means you can deduct your expenses just like someone who is self-employed in another line of business even if it means you show a net loss (expenses greater than income) for the year