Firstly the Ottomans were always a Muslim empire, at the very least since the reign of Selim the Grim, and they certainly considered themselves as such to a certain extent and after 1517 had become a more traditional Islamic state.
Secondly the notion of Turk, and Turkish nationalism was a relatively modern construction. An Ottoman for much of the Ottoman Empire if asked what he was might give his tribal affiliation, he might say that he belonged to the House of Osman, he might give his religious identity, or he might call himself an Ottoman. Turk would not have been a term used by him. Turk was somewhat insulting. A Turk was a dirty peasant who worked in a field.
At this point in time the predominant reformist ideology is not Pan-Turkism or Turkish nationalism, the Young Turks at this point are still a tickle in the Ottoman testicles. The Young Ottomans, and the notion of Ottomanism are strong at this point especially since in the given time period we are still in the Tanzimat era.