You can use just two GPIO's to drive an unlimited number of LED's using daisy chained 74HC595 shift registers with output latches. Normally you would need a third GPIO for the shift serial data to parallel latches function, (ST_CP), besides the normal clock in (SH_CP) and data in (DS) inputs, but there is a trick you can use to do it without, and reduce the needed pins to just two. Simply use the last Q output of the shift-register string to (when it becomes "1") to reset all the shift registers to zeros, (using all the MR pins) and at the same time clock in the parallel data to the outputs, (using all the ST_CP pins) using a single inverter. To reset the string to all zeroes, and a known condition clock in a "1" and then the number of bits of the shift registers with "0"'s. The string will be cleared to zero, at the latest point that the initial "1" reaches the output, then simply clock in a "1" followed by the pattern of "1"'s and "0"'s you want.
I think it might even be possible to use a single GPIO bit by using a couple of RC delays, and an XOR for the clock generation. Delay the input data (DS) with an RC, and use another smaller RC to create a pulse whenever the data changes by delaying on input of the XOR with an RC and the other not. To clock in a 0 output a 0 for long enough to reach the DS input then either produce a very short 1 pulse if the next bit is again a zero, or simply transfer to one if the next bit is a one.
The idea is that in both cases the xor should produce a single clock pulse to clock in the DS data. if the XOR actually produces two pulses very close to each other, use a third RC so the pulses "flow together into one".