Margin of error = 0.07 = std. error * a multiplier
The multiplier can come from a table of standard normal quantiles. For a 90% C.I. it's the number that leaves 5% of the probability in each tail, so 0.05 on the low side and 0.95 on the high side.
With the multiplier you can solve for the value of std. error: std. error = 0.07 / multiplier
Then, std. error = sample std. deviation / sqrt(n)
The sample std. deviation is sqrt(p * (1-p)) where p is the proportion supporting the candidate. Of course you don't know p, that's what you're trying to find out with the survey! But there is a solution. Set p = 0.5, that will produce the largest standard deviation. Use that value to solve for n, the sample size.
I have used sqrt() here to denote the square root. For example sqrt(4) = 2.