I live in Barcelona and I have taken a taxi from the airport lots of times. Taxi system is a very regulated sector in Barcelona. Fares of official regular taxis are controlled by the IMET, the Metropolitan Taxi Institute which depends from AMB (Barcelona Metropolitan Area). Specially at the airport, you won't find a "cheapest way" to take taxi, you will find taxi fares that are the same for all taxis.
You will have to pay a supplement of 3.10€ for catching a taxi from the airport and 1.00€ for each piece of luggage placed in the boot. When you get to the cab, a rate called "la baixada de bandera" is applied. Then there is a fixed rate for distance covered and also a fixed rate for the time passing when the taxi is stopped: you will see how these are being charged on the taximeter located inside the cab. Note that these rates are more expensive on weekends and holidays and also from 20:00 to 8:00 than at the rest of the day. At the end of the journey, the above mentioned supplements will be added to the taximeter. Notice that a minimum fare of 20.00€ (including supplements) will be always charged to you for the fact of getting a taxi at the airport.
You can find official information about taxi fares from the IMET at this website (in Catalan).
Taxi sector is so strictly regulated nowadays that I think it's very difficult you get scammed. As you can see in the pictures of the official website of IMET, you will find the driver identification and the taxi license number located very visibly at the interior of the cab. Anyway, if you need to make a complaint, you can always ask for a receipt to the taxi driver. Such a receipt will contain all the relevant data you need to fill out the official complaint form that you will have to send along with your receipt to the following address: Institut Metropolità del Taxi, carrer 62 núm. 18 - Zona Franca - 08040 Barcelona.
You can find some more practical information about Barcelona airport taxi service at this website (however note that it's unofficial).