Yes, just make sure when you wye off for the toilet, that you add a vent between the toilet and the wye within six feet of the toilet.
Most codes call for a 2" vent for a toilet.
If the vent is laid flat in the floor, it should be above the flow line of the pipe. Many times I will use a 3x2 wye with a street 45, and roll the wye to raise the vent line up a bit.