A small tank like that is going to make it quite cramped for the betta and shrimp together. I've arranged a 25l tank for my betta and cherry shrimp; it's currently cycling. I planted it with a lot of hidey holes for the shrimp, it's heated and filtered. I think it's important for the shrimp to have room to get away from the betta and places to hide, and chances are in a small tank it's pretty likely they are going to be a bit stressed about the nearby predator! A larger shrimp is less likely to be a victim, but as Derp mentioned they can also damage or kill your betta, and nobody wants that. Shrimp need clean water so a lack of filter might cause a problem there too. So the answer is you can, but it's probably going to make the shrimp unhappy or risk your betta being injured.