I've never heard of anybody trying to carbonate in a small barrel before, but I suppose you could do it by putting a strap around the barrel to hold the bung in place. That said, my suggestion is to fill the barrel with whiskey and brew a full 5 gallon batch of imperial stout. Rack the beer to a secondary and let it bulk age for a few months or so until it is tasting great. At that point, the barrel will be well infused with the whiskey flavor, so you can rack the whiskey out and put the beer in.
As mentioned above, the beer will be infused with the barrel flavor very quickly so you should taste it every week or so to see when it should be pulled. If you find that you overshoot your target for the barrel flavor, you can blend it back with some of the base beer to hit your target. The great part about this plan is that you can give the barrel a rinse and put the whiskey back in it to get ready for the next batch.
I've done this myself with a 2.5g oak barrel and it has worked very well. I do find that using kegs makes that whole process much easier, so if you don't have a kegging system it might not be practical.
One other thing I wanted to mention is that if you do plan to rack pre-carbonated beer into the barrel, you may end up with excessive foaming (think mentos and diet coke), so you'll want to plan accordingly.