You will be ABSOLUTELY FINE TO TAKE A TAXI AT 2AM! Getting a taxi will be VERY HARD on Yom Kippur, and I doubt it will even be able to enter the grounds of TLV as it's closed on Yom Kippur. Even with security and the like, you do not need to be there 4 hours before, unless you look and act like a terrorist. Even with racial profiling, 3 hours is more than fine. I routinely get there 2 hours before, and still end up waiting at the gate.
ETA: Just re-read the OP. You don't need to get there at 23:00 or 00:00, though that would be after YK ends, so no problem entering the airport at that time. Where are you coming from? If you're leaving from anywhere in the Merkaz District (Tel Aviv metropolitan area, Jerusalem metropolitan area...) to get there even by 23:00, you still would be leaving AFTER YK ends, so again, no problem.