First things first - to answer your question: Both
We often use were instead of was after if - in speech, many English people say If I was. In a formal style were is more common than was, and many people consider it more correct.
- If I were rich, I would spend all my time travelling.
- If my nose were a little shorter I'd be quite pretty.
- If I were you, I’d fill the tank now so that we don’t run out of petrol.
- If he were nicer, I wouldn't hate him so much.
Things to think about:
Are these sentences real or unreal?
Do we use them to describe what things are really like or what we wish should / would / could happen?