The classical RLE algorithm compresses data by using numbers to represent how many times the character following a number appears in the text at that position. For example:
I do not believe dynamic programming will work here, as you could have sub-strings about half the length of the full string in the solution. Looks like you need to use brute force. For a related problem, check out the Lempel-Ziv-Welch Algorithm. It is an efficient algorithm that finds a minimal encoding by using substrings.