The assessment of optical networks considering physical impairments is frequently accomplished by using time-consuming analysis tools. We propose in this paper to use artificial neural networks to predict the blocking probability of optical networks with dynamic traffic by using topological metrics and general information of the physical layer. The training process is accomplished by supervised learning based on a historical database of networks. We also propose a new and simple topological property to represent the capacity of the network to distribute traffic. From the results, we found that this novel topological property improves the estimator accuracy. We compared the results of our proposal with the outcome of a discrete event simulator for optical networks. The simulator provides an estimate for blocking probability of alloptical networks considering physical impairments. We show that our approach is faster than discrete event simulators; we obtained a speedup of greater than 7500 times, with comparable estimation errors.