Despite the design of crescent and star had already started by mid-1700s, the Ottoman Empire started using officially the red flag with crescent and star dating through a decree from 1793. Despite the star is commonly despicted as 8-pointed in this early period, variants with 7, 6 or even 5 pointed stars were also reported.
The ultimate design of this flag dates back to 1844, when the 5-pointed star was established - so starting there the current Turkish national flag.
Sources: Jaroslav Martykán, «A history of Ottoman naval flags», XVII International Congress of Vexillology 1999 | Wikipedia(tr):Osmanli bayraklari
Sizes: large ensign W12 x L18 mm, small ensigns W8 x L12 mm, jack W6 x L9 mm, pennant W4 x L48 mm.