The correct option is
B were
The given sentence is an unreal conditional statement. Such a statement starts with an 'If' clause containing the past or past perfect tense of a verb followed by a conditional statement containing a modal such as would. From the above explanation it is clear that the verb in the if clause must be in past or past perfect tense. Thus, the answer must be in past or past perfect tense.
Option A is incorrect. 'was' is a verb in the past tense but, for an unreal conditional statement if the verb in the 'If' clause is 'to be', 'were' has to be used instead of 'was'. Thus, 'was' is incorrect.
Option B is correct. 'were' is in the past tense and as mentioned above, according to the rules of usage, for the verb 'to be', 'were' has to be used. Thus, 'were' is the correct answer.
Option C is incorrect. 'am' is in the present tense and so, does not comply with the structure of the unreal conditional statement.
Option D is incorrect. 'have' is in the present tense and so, does not comply with the structure of the unreal conditional statement.