DP - Removing contiguous subsequences from a sequence optimally
First collect the consecutive alphabets together. Say the input string is "1110000110100" then I mean form the array $A=\{(3,1),(4,0),(2,1),(1,0),(1,1),(2,0)\}$ where an element (  called chunk ) of $A$ $(a,b)$ means there are $a$ consecutive $b \in \{0,1\}$. Now the problem has been reduced to removal of chunks and we will concern ourselves with $A$ rather than the original string.
Now make a DP table $D$ where $D[i][j][k]$ means least number of steps used to removed all chunks till $A[i]$ such that last chunk removed was of $k \in \{0,1\}$ and the size of the last chunk removed was $j$. If it is not possible assign it $\infty$ ( take care of the boundary cases and initial condition for table $D$ ).
Now say you are at chunk $i$ and it is a chunk made of 0's and it's size is $t$. Now you have to fill the table $D[i][][]$ given that you have already filled the tables $D[1][][],D[2][][]......D[i-1][][]$. You have two options (a) If $t \ge K$ remove this chunk first and now you are left with subproblem with $A[1]...A[i-1]$; (b) or if its possible to remove the chunks of 1's before , and then if the chunk of 0's get's size greater than equal to $K$, you can remove it ( rwe will take minimum of all cases while filling the DP table ).  As you asked for only hint I leave it upto you for coming up with the recurrence relation.


As you said $N$ and $K$ are small, I think this method would suffice.