Although I don't believe you can really control who you love, if you're married and you are thinking of acting on those feelings, then no it is not okay. If you're dating and fall in love with both of them, you will still need to choose. Having a relationship with two people at the same time isn't fair to any of you.