I don't know if your problem is solvable but let's try.

First problem: are zero lengths strings allowed?

Regardless, you have to design a prefix code. You've said your codes can't expand the input by more than two bits. So each string of length N symbols can be encoded to output of maximum 2 * (N + 1) bits. Since there's no gain from assigning codes shorter than maximum allowed in regard to correctness of solution, we should just assign maximum code length to every input string and then look if we can build prefix code.

So let's assign codes, assuming zero-length strings are possible:

Code:

- -> 00 (zero length input string)
0 -> 0100
... (there are 4 1-letter strings: from 0 to 3)
3 -> 0111
00 -> 100000
... (there are 16 2-letter strings: from 00 to 33)
33 -> 101111
000 -> 11000000
... (there are 64 3-letter strings: from 000 to 333)
333 -> 11111111

We're out of codespace now. We can't encode strings longer than 3 symbols if we allow zero-length strings and fill codespace sequentially.

If we disallow zero-length string then situation will be different. A program would be useful there, but I'm not so inclined :]