I realize that you asked this four months ago, Mosalf, but, in case it benefits anyone, "boy" is a better translation because the contrast between ילד וילדה helps us understand that the meaning of ילד is more specific than just a "child" in this particular context. In English, it wouldn't make much sense to say, "The doctor has a child and a girl" because a "girl" would be assumed to be a child. Are girls not counted as children? Only boys? :-) In that case, "The doctor has two children" would be better. However, since the Hebrew sentence doesn't say לרופאה יש שני ילדים the most accurate translation is "The doctor has a boy and a girl." So, in short, "child" would indeed be incorrect here.
I should add more explicitly that "child" is generally used (in English) in a more general sense than 'boy' (a male child) and 'girl' (a female child). That said, child can also sometimes be used to talk about someone's 'adult children', as in an elderly mother saying that she has five children and eleven grandchildren (probably including boys and girls!). This is similar to how the words boy and girl can at least sometimes be used to refer to people of various ages (young, old, or mixed groups), although the words man and woman are more typical for individual adults (referring specifically to them).