Yes, when you have a duplex or other multi-unit owner occupied property, you can write off the portion that is directly related to the rental. However, if the improvements are related to the entire house and benefit all parts of the building, you would only be able to allocate the rental portion as a deduction. For instance, if the home is split 50/50, and the improvement was for the entire home, you may only deduct 50% on your rental.
For additional information please refer to: IRS: How To Divide Expenses - Duplex
To enter your income and expenses for your rental: TurboTax: Where Do I Enter Income & Expenses From Rental Property