Calm down. There is no law that says you have to be gay or straight. You are attracted to both, so you can be with women if you want to. If it turns out that you would rather be with men, that's okay.
The main thing is that none of this is your fault and it doesn't have to be a bad thing, either way. You will be much happier if you are true to yourself. It is possible to be happy being either gay or straight. We live in a more open society than we used to. Anyone who will judge you, that's their problem.
I would recommend going to some support forum websites for people young and sexually confused. Talk to people in your situation. You aren't alone. (Just don't agree to meet with anyone, promise? There might be someone who will take advantage of you, so just talk anonymously.)
Also, don't worry about your family just yet. They may be more understanding than you think. As for children, yes you can have children.
Just don't panic just now. It's going to be okay.