You should use "if I were" only when you talk about something hypothetical in the present or in future time and "if I was" is when you talk about something that could be true in the past. Therefore, in both of your example cases, you should say "If I were' since you used "would". If you want to use "was" you should then say it like this: If she was single, I would have asked her out!!
Hope that helps ;)