The value of the base resistor determines how well the transistor saturates. The 2N3904 transistor and most others are spec'd to saturate well with the base current at 1/10th the collector current. So for 10mA collector current, the base current is 1mA. Calculate the voltage across the base resistor then use Ohm's Law to calculate its value.
Caution: The max reverse emitter-base voltage for the 2N3904 and most other silicon transistors is only 6V. After subtracting the voltage across the emitter resistor, if 6V or more will occur then protective diodes are recommended.