It is perfectly possible to brew 1 gallon of liquor in a 5 gallon container. The main concern is the air over the brew which, some might say, causes "oxidation" and thus produce off flavours in the brew.
Your fermenter should be at least twenty per cent larger than the quantity of beer you plan to brew. For example, for a 20 litre (five gallon) batch of beer, you need a fermenter with a capacity of at least 24 litres (6 gallons).