GFIC feeding sub panel

Can I use a 50 amp GFIC to feed a sub panel. In the sub panel will be a double pole 30 amp breaker and a double pole 20 amp breaker. Would this give me gfic protection?

If you are asking if the GFCI Circuit Breaker will provide GFCI Protection to the downstream remote distribution panel [RDP] then the answer is yes. Since you did not ask about the scope of the loads to which you are placing in the RDP and any load calculations i will leave my comment to the GFCI question only.

FYI- There are however locations in the NEC that require the GFCI protection at the branch circuit level [680.23(A)(3) for example] so just be aware of the limitations as laid out within the NEC.