Why add resistors to a Transistor Vin and GND
EDIT: I modified this answer to become more accurate

I’m using an iPhone to answer this so pardon my drawing. 

To answer your questions it helps to draw a schematic of your circuit. See image shown below. 

I believe the intent of 1k resistor was to limit base current  to transistor when phototransistor sensor L-51ROPT1D1 is fully on. Also 1k is there to prevent BJT from becoming a RF oscillator. You can use a lower value for base resistor Ranging from 50 to 1k ohm 

Purpose of 10k resistor is to provide a output voltage when transistor 2SC1815 is conducting current. Current through emitter Ie will produce Voltage when a resistor is used. 

Note: If that 10k was placed between collector and supply voltage And emitter terminal ground then the base resistor of 1k or higher would be needed to limit base current and prevent base from becoming Vcc.