The Iranians were far too weak by the latter half of the 19th century to play the kind of role that the Ottoman Empire did. Keep in mind that the Ottoman Empire had far outstripped Iran in pretty much every measurement by 1900, simply because the Iranian state had atrophied. The most powerful armed force in Iran was dominated by Russia, yearly revenues were about 1/20th of that of the Ottomans, and with the Anglo-Russian rapprochement of 1907 Iran had started to lose its de-facto independence as both powers occupied spheres of influence within the country. Iran was simply not able to undertake the kind of military operations that the Ottoman Empire was as it was not an independent power for all intents and purposes.
To answer the question, limited pan-Islamist sentiment aside I can't see it as terribly likely. Once conflicts regarding the Kurdish frontiers had settled down, the Ottoman-Iranian border was still ill defined and a source of anxiety to both powers. While Sunni-Shi'a religious rivalry was not as violent in the late 19th century, there was nevertheless a tension between the two. And realistically, there was nothing much that the weakened Iranian state could actually offer the Ottomans, and especially in the reign of Abdulhamid II there was little appetite for incurring liabilities abroad.
One interesting possibility is that Nader Shah was reported to have wanted to build up a pan-Islamic front against the West, a key motivation behind his attempts to get the "Jafari Madhab" recognised. Perhaps a surviving Afsharid Empire that doesn't totally trash the Ottoman Empire could be a possible starting point for a Iranian-Ottoman alliance?